package cn.thornbird.orgsync.helper;

import cn.thornbird.orgsync.entity.status.AppType;
import cn.thornbird.orgsync.helper.token.*;

public class AccessTokenFactory {

    public AccessToken getAccessToken(AppType appType, String certificateText) {
        AccessToken accessToken = null;
        switch (appType) {
            case Netease:
                accessToken = new NeteaseToken(certificateText);
                break;
            case Wechat:
                accessToken = new WechatToken(certificateText);
                break;
            case DingTalk:
                accessToken = new DingTalkToken(certificateText);
                break;
            case Feishu:
                accessToken = new FeishuToken(certificateText);
                break;
        }
        return accessToken;
    }

}
